/// YApi QuickType插件生成，具体参考文档:https://plugins.jetbrains.com/plugin/18847-yapi-quicktype/documentation

import 'dart:convert';

import 'package:situation/domain/chat/conversation_msg.dart';

ConcatListDomain concatListDomainFromJson(String str) => ConcatListDomain.fromJson(json.decode(str));

String concatListDomainToJson(ConcatListDomain data) => json.encode(data.toJson());

class ConcatListDomain {
    ConcatListDomain({
        required this.children,
        required this.name,
        required this.id,
        required this.type,
    });

    List<OrgChildItem> children;
    String name;
    String id;
    String type;

    factory ConcatListDomain.fromJson(Map<dynamic, dynamic> json) => ConcatListDomain(
        children: List<OrgChildItem>.from(json["children"].map((x) => OrgChildItem.fromJson(x))),
        name: json["name"],
        id: json["id"],
        type: json["type"],
    );

    Map<dynamic, dynamic> toJson() => {
        "children": List<dynamic>.from(children.map((x) => x.toJson())),
        "name": name,
        "id": id,
        "type": type,
    };
}

class OrgChildItem {
    OrgChildItem({
        required this.gwsdUsername,
        required this.headImgUrl,
         this.phone,
        required this.name,
        required this.isGwsd,
        required this.gwsdId,
        required this.gwsdPassword,
        required this.id,
        required this.type,
        required this.hasVideo,
        required this.hasAudio,
        required this.online,
    });

    String gwsdUsername;
    String headImgUrl;
    String? phone;
    String name;
    int isGwsd;
    String gwsdId;
    String gwsdPassword;
    String id;
    String type;
    int hasVideo;
    int hasAudio;
    int online;

    factory OrgChildItem.fromJson(Map<dynamic, dynamic> json) => OrgChildItem(
        gwsdUsername: json["gwsdUsername"],
        headImgUrl: json["headImgUrl"],
        phone: json["phone"],
        name: json["name"],
        isGwsd: json["isGwsd"],
        gwsdId: json["gwsdId"],
        gwsdPassword: json["gwsdPassword"],
        id: json["id"],
        type: json["type"],
        hasVideo: json["hasVideo"],
        hasAudio: json["hasAudio"],
        online: json["online"],
    );

    Map<dynamic, dynamic> toJson() => {
        "gwsdUsername": gwsdUsername,
        "headImgUrl": headImgUrl,
        "phone": phone,
        "name": name,
        "isGwsd": isGwsd,
        "gwsdId": gwsdId,
        "gwsdPassword": gwsdPassword,
        "id": id,
        "type": type,
        "hasVideo": hasVideo,
        "online": online,
        "hasAudio": hasAudio,
    };
}
